import XCTest
import Dispatch
import CGtk
@testable import Gtk
import Gdk
import GLibObject

let serialQueue = DispatchQueue(label: "com.github.rhx.SwiftGtk.tests", qos: .userInitiated)
var aboutToInitialise = false
var initialised = false

class GtkTests: XCTestCase {
    override class func setUp() {
        var needsInitialisation = false
        serialQueue.sync {
            needsInitialisation = !aboutToInitialise
            if needsInitialisation {
                aboutToInitialise = true
            }
        }
        if needsInitialisation {
            var argc = CInt(0)
            var argv = [UnsafeMutablePointer<UnsafeMutablePointer<Int8>?>?]()
            gtk_init(&argc, &argv)
            initialised = true
        } else {
            while !initialised {
                usleep(100000) // ensure gtk is initialised
            }
        }
    }
    func testMajorVersion() { XCTAssertEqual(getMajorVersion(), Int(gtk_get_major_version())) }
    func testMinorVersion() { XCTAssertEqual(getMinorVersion(), Int(gtk_get_minor_version())) }
    func testMicroVersion() { XCTAssertEqual(getMicroVersion(), Int(gtk_get_micro_version())) }
    func testInterfaceAge() { XCTAssertEqual(getInterfaceAge(), Int(gtk_get_interface_age())) }
    func testBinaryAge()    { XCTAssertEqual(getBinaryAge(),    Int(gtk_get_binary_age()))    }

    /// test that we can run and quit an app
    func testApp() {
        let application: Application! = Application()
        XCTAssertNotNil(application)
        var appWasRunning = false
        var appDidStart = false
        let status = application.run(startupHandler: { _ in
            XCTAssertFalse(appDidStart)
            appDidStart = true
            XCTAssertFalse(appWasRunning)
        }, activationHandler: { app in
            appWasRunning = true
            app.quit()
        })
        XCTAssertEqual(status, 0)
        XCTAssertTrue(appWasRunning)
    }

    // test file chooser
    func testFileChooser() {
        XCTAssertNotNil(FileChooserDialog(firstText: "Cancel", secondText: "Okay").ptr)
    }

    // test native file chooser
    func testFileChooserNative() {
        XCTAssertNotNil(FileChooserNative(title: "Native", acceptLabel: "OK", cancelLabel: "Nope").ptr)
    }

    // test dialog convenience constructors
    func testDialog() {
        XCTAssertNotNil(Dialog(text: "Test").ptr)
        XCTAssertNotNil(Dialog(firstText: "OK", secondText: "Cancel").ptr)
        XCTAssertNotNil(Dialog(firstText: "OK", secondText: "Cancel", thirdText: "Review Windows").ptr)
    }

    // test message dialog convenience methods
    func testMessageDialog() {
        let dialog1 = MessageDialog(text: "A simple message dialog")
        dialog1.set(secondaryText: "Change secondary text")
        XCTAssertNotNil(dialog1.ptr)
        let dialog2 = MessageDialog(markup: "Dialog <b>with markup</b>", secondaryMarkup: "and secondary markup")
        dialog2.set(secondaryText: "Change secondary text")
        XCTAssertNotNil(dialog2.ptr)
    }

    // test Scrolled Window convenience methods
    func testScrolledWindow() {
        let vadj = Adjustment(value: 0, lower: 0, upper: 1, stepIncrement: 1, pageIncrement: 1, pageSize: 1)
        let window1 = ScrolledWindow(vAdjustment: AdjustmentRef?.none)
        let window2 = ScrolledWindow(vAdjustment: vadj)
        XCTAssertNotNil(window1.ptr)
        XCTAssertNotNil(window2.ptr)
        XCTAssertEqual(window1.allocatedHeight, 1)
        XCTAssertEqual(window2.allocatedHeight, 1)
    }

    /// text text buffers
    func testTextBuffer() {
        guard let buffer = TextBuffer() else { XCTFail() ; return }
        let text = "Hello, world!\n"
        buffer.text = text
        XCTAssertEqual(buffer.text, text)
    }

    /// test tree view row-activated signal handler
    func testTreeViewRowActivated() {
        var columnTypes = [GType.string]
        let treeStore = TreeStore(nColumns: 1, types: &columnTypes)
        let treeView = TreeView(model: treeStore)
        let treeColumn = TreeViewColumn(0)
        let treePath = TreePath(string: "0")
        treeView.append([treeColumn])
        var isTV = false
        var isTC = false
        var isTP = false
        var activated = false
        treeView.onRowActivated { (tv, tp, tc) in
            isTV = tv.ptr == treeView.ptr
            isTC = tc.ptr == treeColumn.ptr
            isTP = tp.compare(b: treePath) == 0
            activated = true
        }
        XCTAssertFalse(activated)
        XCTAssertFalse(isTV)
        XCTAssertFalse(isTP)
        XCTAssertFalse(isTC)
        treeView.rowActivated(path: treePath, column: treeColumn)
//        RunLoop.current.run(until: Date(timeIntervalSinceNow: 0.25))
        XCTAssertTrue(activated)
        XCTAssertTrue(isTV)
        XCTAssertTrue(isTP)
        XCTAssertTrue(isTC)
    }

    func testInitiallyUnowned() {
//        var argc = CInt(0)
//        var argv = [UnsafeMutablePointer<UnsafeMutablePointer<Int8>?>?]()
//        gtk_init(&argc, &argv)
        let ad = AboutDialog()
        XCTAssertEqual(ad is InitiallyUnownedProtocol, typeIsA(type: ad.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let ag = AccelGroup()
        XCTAssertEqual(ag is InitiallyUnownedProtocol, typeIsA(type: ag.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let al = AccelLabel(string: "A")
        XCTAssertEqual(al is InitiallyUnownedProtocol, typeIsA(type: al.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let action = Action(name: "Test")
        XCTAssertEqual(action is InitiallyUnownedProtocol, typeIsA(type: action.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let actionBar = ActionBar()
        XCTAssertEqual(actionBar is InitiallyUnownedProtocol, typeIsA(type: actionBar.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let actionGroup = ActionGroup(name: "Test")
        XCTAssertEqual(actionGroup is InitiallyUnownedProtocol, typeIsA(type: actionGroup.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let adjustment = Adjustment(value: 0, lower: 0, upper: 1, stepIncrement: 1, pageIncrement: 1, pageSize: 10)
        XCTAssertEqual(adjustment is InitiallyUnownedProtocol, typeIsA(type: adjustment.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let alignment = Alignment(xalign: 0, yalign: 0, xscale: 1, yscale: 1)
        XCTAssertEqual(alignment is InitiallyUnownedProtocol, typeIsA(type: alignment.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let appChooserButton = AppChooserButton(contentType: "Test")
        XCTAssertEqual(appChooserButton is InitiallyUnownedProtocol, typeIsA(type: appChooserButton.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let appChooserDialog = AppChooserDialog(contentType: Optional<Gtk.WindowRef>.none, flags: .modal, contentType: "Test")
        XCTAssertEqual(appChooserDialog is InitiallyUnownedProtocol, typeIsA(type: appChooserDialog.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let app = Application()!
        XCTAssertEqual(app is InitiallyUnownedProtocol, typeIsA(type: app.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let appWindow = ApplicationWindow(application: app)
        XCTAssertEqual(appWindow is InitiallyUnownedProtocol, typeIsA(type: appWindow.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let arrow = Arrow(arrowType: .right, shadowType: .etchedIn)
        XCTAssertEqual(arrow is InitiallyUnownedProtocol, typeIsA(type: arrow.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let arrowAccessible = arrow.accessible!
        XCTAssertEqual(arrowAccessible is InitiallyUnownedProtocol, typeIsA(type: arrowAccessible.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let aspectFrame = AspectFrame(label: "X", xalign: 0, yalign: 0, ratio: 1, obeyChild: false)
        XCTAssertEqual(aspectFrame is InitiallyUnownedProtocol, typeIsA(type: aspectFrame.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let assistant = Assistant()
        XCTAssertEqual(assistant is InitiallyUnownedProtocol, typeIsA(type: assistant.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let box = Box(orientation: .horizontal, spacing: 0)
        XCTAssertEqual(box is InitiallyUnownedProtocol, typeIsA(type: box.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        /*
        let o = Buildable()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Builder()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Button()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ButtonAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ButtonBox()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Calendar()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = CellAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = CellAccessibleParent()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = CellArea()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = CellAreaBox()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = CellAreaContext()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = CellEditable()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = CellLayout()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = CellRenderer()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = CellRendererAccel()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = CellRendererClassPrivate()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = CellRendererCombo()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = CellRendererPixbuf()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = CellRendererProgress()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = CellRendererSpin()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = CellRendererSpinner()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = CellRendererText()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = CellRendererToggle()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = CellView()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = CheckButton()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = CheckMenuItem()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = CheckMenuItemAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Clipboard()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ColorButton()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ColorChooser()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ColorChooserDialog()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ColorChooserWidget()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ColorSelection()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ColorSelectionDialog()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ComboBox()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ComboBoxAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ComboBoxText()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Container()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ContainerAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ContainerCellAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = CssProvider()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = CssSection()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Dialog()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = DrawingArea()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Editable()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Entry()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = EntryAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = EntryBuffer()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = EntryCompletion()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = EntryIconAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = EventBox()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = EventController()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = EventControllerKey()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = EventControllerMotion()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = EventControllerScroll()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Expander()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ExpanderAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = FileChooser()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = FileChooserButton()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = FileChooserDialog()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = FileChooserNative()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = FileChooserWidget()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = FileFilter()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = FileFilterInfo()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Fixed()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = FixedChild()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = FlowBox()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = FlowBoxAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = FlowBoxChild()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = FlowBoxChildAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = FontButton()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = FontChooser()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = FontChooserDialog()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = FontChooserWidget()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = FontSelection()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = FontSelectionDialog()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Frame()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = FrameAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = GLArea()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Gesture()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = GestureDrag()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = GestureLongPress()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = GestureMultiPress()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = GesturePan()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = GestureRotate()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = GestureSingle()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = GestureStylus()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = GestureSwipe()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = GestureZoom()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Gradient()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Grid()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = HBox()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = HButtonBox()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = HPaned()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = HSV()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = HScale()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = HScrollbar()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = HSeparator()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = HandleBox()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = HeaderBar()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = HeaderBarAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = IMContext()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = IMContextInfo()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = IMContextSimple()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = IMMulticontext()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = IconFactory()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = IconInfo()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = IconSet()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = IconSource()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = IconTheme()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = IconView()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = IconViewAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Image()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ImageAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ImageCellAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ImageMenuItem()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = InfoBar()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Invisible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Label()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = LabelAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = LabelSelectionInfo()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Layout()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = LevelBar()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = LevelBarAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = LinkButton()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = LinkButtonAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ListBox()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ListBoxAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ListBoxRow()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ListBoxRowAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ListStore()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = LockButton()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = LockButtonAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Menu()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = MenuAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = MenuBar()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = MenuButton()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = MenuButtonAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = MenuItem()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = MenuItemAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = MenuShell()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = MenuShellAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = MenuToolButton()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = MessageDialog()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Misc()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ModelButton()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = MountOperation()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = NativeDialog()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Notebook()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = NotebookAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = NotebookPageAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = NumerableIcon()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = OffscreenWindow()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Orientable()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Overlay()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = PadActionEntry()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = PadController()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = PageRange()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = PageSetup()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Paned()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = PanedAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = PaperSize()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = PlacesSidebar()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = PlugAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Popover()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = PopoverAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = PopoverMenu()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = PrintContext()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = PrintOperation()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = PrintOperationPreview()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = PrintSettings()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ProgressBar()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ProgressBarAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = RadioAction()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = RadioActionEntry()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = RadioButton()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = RadioButtonAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = RadioMenuItem()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = RadioMenuItemAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = RadioToolButton()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Range()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = RangeAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = RcContext()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = RcProperty()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = RcStyle()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = RecentAction()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = RecentChooser()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = RecentChooserDialog()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = RecentChooserMenu()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = RecentChooserWidget()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = RecentData()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = RecentFilter()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = RecentFilterInfo()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = RecentInfo()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = RecentManager()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = RendererCellAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = RequestedSize()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Requisition()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Revealer()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Scale()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ScaleAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ScaleButton()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ScaleButtonAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Scrollable()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Scrollbar()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ScrolledWindow()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ScrolledWindowAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = SearchBar()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = SearchEntry()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = SelectionData()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Separator()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = SeparatorMenuItem()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = SeparatorToolItem()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Settings()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = SettingsValue()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ShortcutLabel()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ShortcutsGroup()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ShortcutsSection()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ShortcutsShortcut()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ShortcutsWindow()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = SizeGroup()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = SocketAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = SpinButton()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = SpinButtonAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Spinner()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = SpinnerAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Stack()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = StackAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = StackSidebar()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = StackSwitcher()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = StatusIcon()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Statusbar()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = StatusbarAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = StockItem()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Style()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = StyleContext()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = StyleProperties()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = StyleProvider()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Switch()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = SwitchAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = SymbolicColor()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Table()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = TableChild()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = TableRowCol()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = TargetEntry()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = TargetList()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = TargetPair()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = TearoffMenuItem()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = TextAppearance()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = TextAttributes()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = TextBTree()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = TextBuffer()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = TextCellAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = TextChildAnchor()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = TextIter()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = TextMark()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = TextTag()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = TextTagTable()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = TextView()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = TextViewAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ThemeEngine()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ThemingEngine()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ToggleAction()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ToggleActionEntry()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ToggleButton()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ToggleButtonAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ToggleToolButton()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ToolButton()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ToolItem()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ToolItemGroup()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ToolPalette()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ToolShell()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Toolbar()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Tooltip()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = ToplevelAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = TreeDragDest()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = TreeDragSource()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = TreeIterBase()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = TreeModel()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = TreeModelFilter()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = TreeModelSort()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = TreePath()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = TreeRowReference()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = TreeSelection()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = TreeSortable()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = TreeStore()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = TreeView()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = TreeViewAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = TreeViewColumn()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = UIManager()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = VBox()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = VButtonBox()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = VPaned()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = VScale()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = VScrollbar()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = VSeparator()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Viewport()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = VolumeButton()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Widget()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = WidgetAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = WidgetClassPrivate()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = WidgetPath()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = Window()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = WindowAccessible()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = WindowGeometryInfo()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = WindowGroup()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = _MountOperationHandler()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = _MountOperationHandlerIface()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = _MountOperationHandlerProxy()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = _MountOperationHandlerProxyClass()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = _MountOperationHandlerProxyPrivate()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = _MountOperationHandlerSkeleton()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = _MountOperationHandlerSkeletonClass()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
        let o = _MountOperationHandlerSkeletonPrivate()
        XCTAssertEqual(o is InitiallyUnownedProtocol, typeIsA(type: o.type, isAType: InitiallyUnownedClassRef.metatypeReference))
 */
    }
}

extension GtkTests {
    static var allTests : [(String, (GtkTests) -> () throws -> Void)] {
        return [
            ("testApp",                 testApp),
            ("testDialog",              testDialog),
            ("testFileChooser",         testFileChooser),
            ("testFileChooserNative",   testFileChooserNative),
            ("testInitiallyUnowned",    testInitiallyUnowned),
            ("testMessageDialog",       testMessageDialog),
            ("testTextBuffer",          testTextBuffer),
            ("testScrolledWindow",      testScrolledWindow),
            ("testMajorVersion",        testMajorVersion),
            ("testMinorVersion",        testMinorVersion),
            ("testMicroVersion",        testMicroVersion),
            ("testInterfaceAge",        testInterfaceAge),
            ("testBinaryAge",           testBinaryAge),
        ]
    }
}
